<template>
    <header>
         <h1>
             <!-- logo -->
             <img src="@/assets/images/logo.png" alt="">
         </h1>
         <!-- 搜索栏 -->
         <div class="search" @click="goSearch">
             <!-- 搜索图标 -->
             <i class='iconfont icon-fangdajing'></i>
             <span>搜索你想要的商品...</span>
         </div>
         <!-- 客服图标 -->
         <div class='kefuu'>
          <i class='iconfont icon-kefu'></i> 
        </div>
         <div></div>
         <div></div>

    </header>
</template>
<script>
export default{
    methods:{
        goSearch(){
            this.$router.push('/search')
        }
    }
}
</script>
<style scoped>
header{
    display: flex;
     justify-content: space-around; 
    /* 保持位置不变 */
     position: fixed; 
     /* 由于会被轮播图遮挡，设置顶部层级为最高 */
     z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color:rgba(053,103,083) ;
    border-bottom:3px solid rgb(9, 13, 12) ;
}
header h1{
    width: 70px;
    height: 35px;
}
header h1 img{
    margin-top: 15px;
    left: 3px;
    width:65px ;
    height: 22px;

}
.search{
    display: flex;
    align-items: center;
    margin-top: 13px;
    width: 240px;
    height: 29px;
    background-color: #cbcfb5;
    border-radius: 12px;
    
}
.kefuu{
    margin-top: 10px;
}
.kefuu i{

font-size: 34px;
color: rgb(210, 198, 158);
}
.search i{
    padding-left: 5px;
    font-size: 24px;
    color: rgb(102, 138, 82);
}
.search span{
    padding-left: 5px;
    font-size: 15px;
    color:rgb(102, 138, 82);
}
</style>